package bishi;

import java.util.Scanner;

/**
 * @Author liuhaoqi
 * @Date 2020/8/24 14:08
 * @Version 1.0
 */
public class Tencent05 {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.nextLine();
        int q = scanner.nextInt();
        int[][] arr = new int[10000005][2];
        for (int i = 0; i < q; i++) {
            arr[i][0] = scanner.nextInt();
            arr[i][1] = scanner.nextInt();
        }

    }

    boolean check(int i, int j){
        for(int k=0;k<(j-i+1)/2;k++){
//            if(s[i+k] != s[j-k]) return false;
        }
        return true;
    }
}
